package com.zzsource.yuapicliensdk.service;

import cn.hutool.http.HttpResponse;
import com.zzsource.yuapicliensdk.client.YuApiClient;
import com.zzsource.yuapicliensdk.exception.ApiException;
import com.zzsource.yuapicliensdk.model.request.*;
import com.zzsource.yuapicliensdk.model.response.*;

/**
 * @Author: QiMu
 * @Date: 2023年09月17日 08:34
 * @Version: 1.0
 * @Description:
 */
public interface ApiService {
    /**
     * 通用请求
     *
     * @param request 要求
     * @return {@link HttpResponse}
     * @throws ApiException 业务异常
     */

    <O, T extends ResultResponse> T request(BaseRequest<O, T> request) throws ApiException;

    /**
     * 通用请求
     *
     * @param yuApiClient
     * @param request     要求
     * @return {@link T}
     * @throws ApiException 业务异常
     */
    <O, T extends ResultResponse> T request(YuApiClient yuApiClient, BaseRequest<O, T> request) throws ApiException;


    /**
     * 随机毒鸡汤
     *
     * @return {@link PoisonousChickenSoupResponse}
     * @throws ApiException 业务异常
     */
    PoisonousChickenSoupResponse getPoisonousChickenSoup() throws ApiException;

    /**
     * 喝毒鸡汤
     *
     * @param yuApiClient
     * @return {@link PoisonousChickenSoupResponse}
     * @throws ApiException 业务异常
     */
    PoisonousChickenSoupResponse getPoisonousChickenSoup(YuApiClient yuApiClient) throws ApiException;

    /**
     * 随机笑话
     *
     * @return {@link PoisonousChickenSoupResponse}
     * @throws ApiException 业务异常
     */
    RandomJokeResponse getRandomJoke() throws ApiException;

    /**
     * 随机笑话
     *
     * @param yuApiClient
     * @return {@link PoisonousChickenSoupResponse}
     * @throws ApiException 业务异常
     */
    RandomJokeResponse getRandomJokeResponse(YuApiClient yuApiClient) throws ApiException;

    /**
     * 随机生成二次元图片
     *
     * @return {@link ACGImgResponse}
     * @throws ApiException 业务异常
     */
    ACGImgResponse getACGImg() throws ApiException;

    /**
     * 随机生成二次元图片
     *
     * @param yuApiClient
     * @return {@link ACGImgResponse}
     * @throws ApiException 业务异常
     */
    ACGImgResponse getACGImg(YuApiClient yuApiClient) throws ApiException;

    /**
     * bi智能分析
     *
     * @return {@link BiResponse}
     * @throws ApiException 业务异常
     */
    BiResponse getOpenGenChartByAi(OpenGenChartByAiRequest openGenChartByAiRequest) throws ApiException;

    /**
     * bi智能分析
     *
     * @param yuApiClient
     * @return {@link BiResponse}
     * @throws ApiException 业务异常
     */
    BiResponse getOpenGenChartByAi(OpenGenChartByAiRequest openGenChartByAiRequest, YuApiClient yuApiClient) throws ApiException;
}
